﻿using BCCommon.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Common.PushMessageConfig
{
    /// <summary>
    /// 推送消息配置请求
    /// </summary>
    public class PushMessageConfigRequestDto
    {
        /// <summary>
        /// 推送消息类型
        /// </summary>
        [Display(Name = "推送消息类型")]
        [Required(ErrorMessage ="{0} 不能为空")]
        public PushMessageType PushMessageType { get; set; }
        /// <summary>
        /// 范围
        /// </summary>
        [Display(Name = "范围")]
        public int Ranges { get; set; }
        /// <summary>
        /// 消息标题
        /// </summary>
        [Display(Name = "消息标题")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(40, MinimumLength = 2, ErrorMessage = "{0} 字符长度应在2-40个字符之间")]
        public string MessageTitle { get; set; }
        /// <summary>
        /// 消息模板
        /// </summary>
        [Display(Name = "消息模板")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(120, MinimumLength = 2, ErrorMessage = "{0} 字符长度应在2-120个字符之间")]
        public string MessageTemplate { get; set; }
        /// <summary>
        /// 消息模板备注
        /// </summary>
        [Display(Name = "消息模板备注")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(400, MinimumLength = 2, ErrorMessage = "{0} 字符长度应在2-400个字符之间")]
        public string MessageTemplateRemark { get; set; }
    }
}
